package com.zmh.service.icq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.zmh.common.DateUtil;
import com.zmh.service.http.utils.HttpAPIService;
import com.zmh.service.http.utils.HttpResult;


/** 
 * 酷Q消息发送
 * @author: zhoumh
 * @version: 创建时间：2018年8月30日 上午11:00:16 
 * @Description: 
*/ 
@Service
public class IcqMsgService {
	private static Logger logger = LoggerFactory.getLogger(IcqMsgService.class);
	@Autowired
	private HttpAPIService httpAPIService;
	
	public void recv(){
		
	}
	
	public void sendPrivateMsg(String msg) throws Exception{
		JSONObject params = new JSONObject();
		params.put("user_id", 382727397);
		params.put("message", msg);
		System.out.println(params.toJSONString());
		HttpResult result = httpAPIService.doPostJson("http://127.0.0.1:5700/send_private_msg", params.toJSONString());
		System.out.println(result.getBody());
	}
}
